from flask import Flask

from models import db
from views import index_blu

# 创建flask对象
app = Flask(__name__)

# 从配置文件中加载配置信息，然后对app进行配置
app.config.from_pyfile('config.ini')

# 注册蓝图
app.register_blueprint(index_blu)

# 将数据库操作与app结合
db.init_app(app)

if __name__ == '__main__':
    app.run(port=8899)
